package com.wicket.okrapp.processor.timer;


import com.wicket.okrapp.biz.service.TimingTaskService;
import com.wicket.okrapp.biz.service.dto.req.RefreshFourTreeDeviationDaysDispatchComReqDto;
import com.wicket.okrapp.biz.service.dto.req.TimingAddSimpleAddReportTaskReqDto;
import com.wicket.okrapp.biz.service.dto.req.TimingRefreshStageCurrentCycleDispatchReqDto;
import com.wicket.okrapp.biz.service.dto.req.TimingRefreshTaskOverdueDispatchReqDto;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class TimerProcessor {
    @Autowired
    TimingTaskService timingTaskService;

    @XxlJob("3280")
    public void timingAddSimpleAddReportTask() throws Exception {
        XxlJobHelper.log("XXL-JOB, 3280");
        TimingAddSimpleAddReportTaskReqDto reqDto = new TimingAddSimpleAddReportTaskReqDto();
        timingTaskService.timingAddSimpleAddReportTask(reqDto);
        // default success
    }


    @XxlJob("3362")
    public void timingRefreshStageCurrentCycleDispatch() throws Exception {
        XxlJobHelper.log("XXL-JOB, 3362");
        TimingRefreshStageCurrentCycleDispatchReqDto reqDto = new TimingRefreshStageCurrentCycleDispatchReqDto();
        timingTaskService.timingRefreshStageCurrentCycleDispatch(reqDto);
        // default success
    }

    @XxlJob("3363")
    public void timingRefreshTaskOverdueDispatch() throws Exception {
        XxlJobHelper.log("XXL-JOB, 3363");
        TimingRefreshTaskOverdueDispatchReqDto reqDto = new TimingRefreshTaskOverdueDispatchReqDto();
        timingTaskService.timingRefreshTaskOverdueDispatch(reqDto);
        // default success
    }

    @XxlJob("3357")
    public void refreshFourTreeDeviationDaysDispatchCom() throws Exception {
        XxlJobHelper.log("XXL-JOB, 3357");
        RefreshFourTreeDeviationDaysDispatchComReqDto reqDto = new RefreshFourTreeDeviationDaysDispatchComReqDto();
        timingTaskService.refreshFourTreeDeviationDaysDispatchCom(reqDto);
        // default success
    }
}
